package com.example.uitest;

import android.os.Bundle;
import android.os.Handler;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.Window;

public class LogoActivity extends BaseActivty {

	Handler handler;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_logo);
		handler = new Handler();
		handler.postDelayed(irun, 2000);
	}
	
	
	Runnable irun = new Runnable() {
		@Override
		public void run() {
			// TODO Auto-generated method stub
			Intent it = new Intent(LogoActivity.this, LoginActivity.class);
			it.putExtra("auto", 1);
			startActivity(it);
			finish();
			
			//overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
		}
	};

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
	
	@Override
	public void onBackPressed(){
		super.onBackPressed();
		handler.removeCallbacks(irun);
	}

}
